{% extends 'layout.html' %}

{% block head %}
<link rel="stylesheet" href="/blog/static/css/dashboard/post.css" type="text/css">
{% endblock %}

{% block foot %}
<script src="/blog/static/js/dashboard/site_link.js" type="text/javascript"></script>
{% endblock %}

{% block content %}
	{% include 'bread.html'%}
	<div class="view-content">
	<div class="view-content-container">
		<table class="table table-striped table-condensed">
	      <thead>
	        <tr>
	          <th>id</th>
	          <th>链接名称</th>
	          <th>链接地址</th>
	          <th>操作</th>
	        </tr>
	      </thead>
	      <tbody id="linkBody">
	        <tr><form action="/dashboard/site/aj_link_edit" method="post" id="linkFormAdd">
	          <th scope="row"><input type="text" class="form-control"  name="id" required></th>
	          <td><input type="text" class="form-control"  name="name" required></td>
	          <td><input type="text" class="form-control"  name="href"></td>
	          <td><input type="hidden" name="is_new" value="1"><input type="submit" class="btn btn-primary" value="添加"></td>
	        </form></tr>
	      	{% for link in siteInfo.links%}
	        <tr>
	          <th scope="row">{{ link.id }}</th>
	          <td>{{ link.name }}</td>
	          <td>{{ link.href }}</td>
	          <td><a>编辑</a><span> | </span><a href="#" class="delete" data-id="{{ link.id }}">删除</a></td>
	        </tr>
	        {% endfor %}
	      </tbody>
	    </table>
	</div>
	</div>
{% endblock %}
